package com.five.admin.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Builder
@Data
@AllArgsConstructor
public class MenuRouterVo {
    /**
     * 路由名称（英文标识）
     */
    private String name;

    /**
     * 路由路径
     */
    private String path;

    /**
     * 组件路径
     * - 一级菜单: "Layout"
     * - 二级菜单: "system/user/index"
     */
    private String component;

    /**
     * 重定向路径
     */
    private String redirect;

    /**
     * 是否隐藏菜单
     */
    private Boolean hidden = false;

    /**
     * 菜单元信息
     */
    private MenuMeta meta;

    private Integer sort;

    /**
     * 子菜单
     */
    private List<MenuRouterVo> children;

    public MenuRouterVo(){}

    public MenuRouterVo( String name, String path, String component, String redirect, Boolean hidden, MenuMeta meta, List<MenuRouterVo> children, Integer sort) {
        this.name = name;
        this.path = path;
        this.component = component;
        this.redirect = redirect;
        this.hidden = hidden;
        this.meta = meta;
        this.sort = sort;
        this.children = children;
    }

    public MenuRouterVo( String name, String path, String component, String redirect, Boolean hidden, MenuMeta meta, List<MenuRouterVo> children) {
        this.name = name;
        this.path = path;
        this.component = component;
        this.redirect = redirect;
        this.hidden = hidden;
        this.meta = meta;
        this.children = children;
    }
}
